﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YinHangZL.aspx.cs" Inherits="Web.Pages.YongShui.YongHuGL.YinHangZL" Theme="Default" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../JS/jquery.js"></script>
    <script src="../../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <script type="text/javascript">
     
        function tuoshouChange(s) {
            if (s.GetChecked()) {
                ASPxCallback1.PerformCallback("gethth");
            }
        }

        function newhth()
        {
            if (txtHeTongH.GetText() != "" && txtHeTongH.GetText().length<=13)
            {
                alert("当前输入的合同号太短。");
                return;
            }
            ASPxCallback1.PerformCallback("newhth");
        }
        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            var specialIdentity = arr[2];
            var msg = arr[3].split('-');
            if (msg[0] == 'True') {
                alert(msg[1]);
            }
            hdCollection.Set("type", type);
            if (state == 'True') {
                if (type == "gethth" || type == "newhth") {
                    //成功获取合同号
                    txtHeTongH.SetValue(specialIdentity);
                }
            }
            else {

            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            银行资料
        </div>
        <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>        
        <asp:UpdatePanel runat="server" ID="upSearch" UpdateMode="Conditional">
            <ContentTemplate>
                <div style="width: 99.8%;">
                    <div style="padding-left: 20px;">
                        <table>
                            <tr>
                                <td>用户号：
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtConYongHuH" runat="server" Width="170px">
                                        <ClientSideEvents KeyPress="function(s,e){var key = event.keyCode;
                                        if( key==13){$('#btnSearch').click();}}" />
                                    </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnSearch" runat="server" Text="查找" UseSubmitBehavior="false" OnClick="btnSearch_Click">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div>
                        <div style="float: left; width: 50%;">
                            <fieldset style="border: 1px solid  cornflowerblue">
                                <legend style="font-weight: bold">用户列表</legend>
                                <dx:ASPxGridView ID="gvList" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" Theme="Aqua1" Width="100%"
                                    OnFocusedRowChanged="gv_FocusedRowChanged" EnableCallBacks="false">
                                    <Columns>
                                        <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="15%">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名">
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Width="35px">
                                            <DataItemTemplate>
                                                <asp:LinkButton ID="lnbModify" runat="server" CausesValidation="false" Text="修改"
                                                    CommandArgument='<%#Eval("ID")%>' OnCommand="lnbModify_Command"></asp:LinkButton>
                                            </DataItemTemplate>
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Width="35px">
                                            <DataItemTemplate>
                                                <asp:LinkButton ID="lnbDel" runat="server" CausesValidation="false" Text="删除" CommandArgument='<%#Eval("ID")%>' OnCommand="lnbDel_Command"></asp:LinkButton>
                                            </DataItemTemplate>
                                        </dx:GridViewDataTextColumn>
                                    </Columns>
                                    <SettingsBehavior AllowFocusedRow="True" ColumnResizeMode="Control" ProcessFocusedRowChangedOnServer="True" />
                                    <Settings VerticalScrollableHeight="270" VerticalScrollBarMode="Auto" />
                                </dx:ASPxGridView>

                                <div style="text-align: right;">

                                    <asp:Panel ID="panListBtns" runat="server">
                                        <table align="right">
                                            <tr>
                                                <td>
                                                    <dx:ASPxButton ID="btnClear" runat="server" Text="清空" UseSubmitBehavior="false" Visible="true" OnClick="btnClear_Click">
                                                    </dx:ASPxButton>
                                                </td>
                                                <td>
                                                    <dx:ASPxButton ID="btnHoldSelected" runat="server" Text="选中保留" Width="80" UseSubmitBehavior="false" Visible="true" OnClick="btnHoldSelected_Click">
                                                    </dx:ASPxButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </div>

                            </fieldset>
                        </div>
                        <div style="float: left; width: 50%;">
                            <fieldset style="border: 1px solid  cornflowerblue">
                                <legend style="font-weight: bold">用户信息</legend>

                                <asp:Panel ID="panEdit" runat="server">
                                    <table style="width: 100%">
                                        <tr>
                                            <td style="text-align: right;">用户号：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtYongHuH" runat="server" Width="100%" ClientEnabled="False">
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">用户名：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtYONGHUM" ClientEnabled="False" ClientInstanceName="txtYONGHUM" runat="server" Width="100%" MaxLength="50">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtYongHuDZ);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">用户地址：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtYongHuDZ"  ClientEnabled="False" ClientInstanceName="txtYongHuDZ" runat="server" Width="100%" MaxLength="100">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtLianXiR);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">联系人：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtLianXiR" ClientEnabled="False" ClientInstanceName="txtLianXiR" runat="server" Width="100%" MaxLength="20">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtLianXiDH);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">联系电话：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtLianXiDH" ClientEnabled="False" ClientInstanceName="txtLianXiDH" runat="server" Width="100%" MaxLength="50">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtLianXiBM);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right; width: 25%">联系部门：
                                            </td>
                                            <td>
                                                <dx:ASPxTextBox ID="txtLianXiBM" ClientEnabled="False" ClientInstanceName="txtLianXiBM" runat="server" Width="100%" MaxLength="20">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtYouBian);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td style="text-align: right; width: 25%">邮编：
                                            </td>
                                            <td>
                                                <dx:ASPxTextBox ID="txtYouBian" ClientEnabled="False" ClientInstanceName="txtYouBian" runat="server" Width="100%" MaxLength="10">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtKaiHuHM);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">开户户名：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtKaiHuHM" ClientEnabled="False" ClientInstanceName="txtKaiHuHM" runat="server" Width="100%" MaxLength="50">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtYHZH);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">银行账号：
                                            </td>
                                            <td colspan="3">

                                                <dx:ASPxTextBox ID="txtYHZH" ClientEnabled="False" ClientInstanceName="txtYHZH" runat="server" Width="100%" MaxLength="50">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtKaiHuYH);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">开户银行：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtKaiHuYH" ClientEnabled="False" ClientInstanceName="txtKaiHuYH" runat="server" Width="100%" MaxLength="50">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtHeTongH);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">合同号：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtHeTongH" ClientInstanceName="txtHeTongH" runat="server" Width="100%" MaxLength="40">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtCaiWuDZ);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td></td>
                                            <td>
                                                <dx:ASPxCheckBox ID="cbTuoShou" ClientEnabled="False" ClientInstanceName="cbTuoShou" runat="server" Text="托收">
                                                    <ClientSideEvents CheckedChanged="function(s,e){tuoshouChange(s);}" />
                                                </dx:ASPxCheckBox>
                                            </td>
                                            <td></td>
                                            <td style="text-align: right;">
                                                <dx:ASPxButton ID="btnNewHeTongH" ClientInstanceName="btnNewHeTongH" runat="server" Text="新合同号" Width="80" UseSubmitBehavior="false"  AutoPostBack="false">
                                                    <ClientSideEvents Click="function(s,e){newhth();}"/>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right; white-space: nowrap;">财务部门地址：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtCaiWuDZ" ClientInstanceName="txtCaiWuDZ" runat="server" Width="100%" MaxLength="50">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtCaiWuYB);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">财务部门邮编：
                                            </td>
                                            <td colspan="3">
                                                <dx:ASPxTextBox ID="txtCaiWuYB" ClientInstanceName="txtCaiWuYB" runat="server" Width="100%" MaxLength="10">
                                                    <ClientSideEvents KeyPress="function(s,e){OnKeyNext(btnSave);}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </fieldset>

                        </div>
                    </div>
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <hr />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="text-align: right;">
                                    <dx:ASPxButton ID="btnSave" ClientInstanceName="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" UseSubmitBehavior="false" Visible="true">
                                    </dx:ASPxButton>
                                    <dx:ASPxButton ID="btnCancel" ClientInstanceName="btnCancel" runat="server" Text="放弃" OnClick="btnCancel_Click" UseSubmitBehavior="false" Visible="true">
                                    </dx:ASPxButton>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>

    </form>
</body>
</html>






